Optimal. Leaf size=433 \[ \frac {2 i a b x}{c^4 d^2}-\frac {b^2 x}{3 c^4 d^2}+\frac {b^2}{2 c^5 d^2 (i-c x)}-\frac {b^2 \text {ArcTan}(c x)}{6 c^5 d^2}+\frac {2 i b^2 x \text {ArcTan}(c x)}{c^4 d^2}+\frac {b x^2 (a+b \text {ArcTan}(c x))}{3 c^3 d^2}+\frac {i b (a+b \text {ArcTan}(c x))}{c^5 d^2 (i-c x)}+\frac {11 i (a+b \text {ArcTan}(c x))^2}{6 c^5 d^2}+\frac {3 x (a+b \text {ArcTan}(c x))^2}{c^4 d^2}-\frac {i x^2 (a+b \text {ArcTan}(c x))^2}{c^3 d^2}-\frac {x^3 (a+b \text {ArcTan}(c x))^2}{3 c^2 d^2}-\frac {(a+b \text {ArcTan}(c x))^2}{c^5 d^2 (i-c x)}+\frac {20 b (a+b \text {ArcTan}(c x)) \log \left (\frac {2}{1+i c x}\right )}{3 c^5 d^2}-\frac {4 i (a+b \text {ArcTan}(c x))^2 \log \left (\frac {2}{1+i c x}\right )}{c^5 d^2}-\frac {i b^2 \log \left (1+c^2 x^2\right )}{c^5 d^2}+\frac {10 i b^2 \text {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{3 c^5 d^2}+\frac {4 b (a+b \text {ArcTan}(c x)) \text {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{c^5 d^2}-\frac {2 i b^2 \text {PolyLog}\left (3,1-\frac {2}{1+i c x}\right )}{c^5 d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.60, antiderivative size = 433, normalized size of antiderivative = 1.00, number of steps
used = 33, number of rules used = 18, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.720, Rules used = {4996, 4930,
5040, 4964, 2449, 2352, 4946, 5036, 266, 5004, 327, 209, 4974, 4972, 641, 46, 5114, 6745}
\begin {gather*} \frac {4 b \text {Li}_2\left (1-\frac {2}{i c x+1}\right ) (a+b \text {ArcTan}(c x))}{c^5 d^2}-\frac {(a+b \text {ArcTan}(c x))^2}{c^5 d^2 (-c x+i)}+\frac {11 i (a+b \text {ArcTan}(c x))^2}{6 c^5 d^2}+\frac {i b (a+b \text {ArcTan}(c x))}{c^5 d^2 (-c x+i)}-\frac {4 i \log \left (\frac {2}{1+i c x}\right ) (a+b \text {ArcTan}(c x))^2}{c^5 d^2}+\frac {20 b \log \left (\frac {2}{1+i c x}\right ) (a+b \text {ArcTan}(c x))}{3 c^5 d^2}+\frac {3 x (a+b \text {ArcTan}(c x))^2}{c^4 d^2}-\frac {i x^2 (a+b \text {ArcTan}(c x))^2}{c^3 d^2}+\frac {b x^2 (a+b \text {ArcTan}(c x))}{3 c^3 d^2}-\frac {x^3 (a+b \text {ArcTan}(c x))^2}{3 c^2 d^2}+\frac {2 i a b x}{c^4 d^2}-\frac {b^2 \text {ArcTan}(c x)}{6 c^5 d^2}+\frac {2 i b^2 x \text {ArcTan}(c x)}{c^4 d^2}+\frac {10 i b^2 \text {Li}_2\left (1-\frac {2}{i c x+1}\right )}{3 c^5 d^2}-\frac {2 i b^2 \text {Li}_3\left (1-\frac {2}{i c x+1}\right )}{c^5 d^2}+\frac {b^2}{2 c^5 d^2 (-c x+i)}-\frac {b^2 x}{3 c^4 d^2}-\frac {i b^2 \log \left (c^2 x^2+1\right )}{c^5 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 209
Rule 266
Rule 327
Rule 641
Rule 2352
Rule 2449
Rule 4930
Rule 4946
Rule 4964
Rule 4972
Rule 4974
Rule 4996
Rule 5004
Rule 5036
Rule 5040
Rule 5114
Rule 6745
Rubi steps
\begin {align*} \int \frac {x^4 \left (a+b \tan ^{-1}(c x)\right )^2}{(d+i c d x)^2} \, dx &=\int \left (\frac {3 \left (a+b \tan ^{-1}(c x)\right )^2}{c^4 d^2}-\frac {2 i x \left (a+b \tan ^{-1}(c x)\right )^2}{c^3 d^2}-\frac {x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^2 d^2}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{c^4 d^2 (-i+c x)^2}+\frac {4 i \left (a+b \tan ^{-1}(c x)\right )^2}{c^4 d^2 (-i+c x)}\right ) \, dx\\ &=\frac {(4 i) \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{-i+c x} \, dx}{c^4 d^2}-\frac {\int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{(-i+c x)^2} \, dx}{c^4 d^2}+\frac {3 \int \left (a+b \tan ^{-1}(c x)\right )^2 \, dx}{c^4 d^2}-\frac {(2 i) \int x \left (a+b \tan ^{-1}(c x)\right )^2 \, dx}{c^3 d^2}-\frac {\int x^2 \left (a+b \tan ^{-1}(c x)\right )^2 \, dx}{c^2 d^2}\\ &=\frac {3 x \left (a+b \tan ^{-1}(c x)\right )^2}{c^4 d^2}-\frac {i x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^3 d^2}-\frac {x^3 \left (a+b \tan ^{-1}(c x)\right )^2}{3 c^2 d^2}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{c^5 d^2 (i-c x)}-\frac {4 i \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^5 d^2}+\frac {(8 i b) \int \frac {\left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{c^4 d^2}-\frac {(2 b) \int \left (-\frac {i \left (a+b \tan ^{-1}(c x)\right )}{2 (-i+c x)^2}+\frac {i \left (a+b \tan ^{-1}(c x)\right )}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{c^4 d^2}-\frac {(6 b) \int \frac {x \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2} \, dx}{c^3 d^2}+\frac {(2 i b) \int \frac {x^2 \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2} \, dx}{c^2 d^2}+\frac {(2 b) \int \frac {x^3 \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2} \, dx}{3 c d^2}\\ &=\frac {3 i \left (a+b \tan ^{-1}(c x)\right )^2}{c^5 d^2}+\frac {3 x \left (a+b \tan ^{-1}(c x)\right )^2}{c^4 d^2}-\frac {i x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^3 d^2}-\frac {x^3 \left (a+b \tan ^{-1}(c x)\right )^2}{3 c^2 d^2}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{c^5 d^2 (i-c x)}-\frac {4 i \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^5 d^2}+\frac {4 b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^5 d^2}+\frac {(i b) \int \frac {a+b \tan ^{-1}(c x)}{(-i+c x)^2} \, dx}{c^4 d^2}-\frac {(i b) \int \frac {a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx}{c^4 d^2}+\frac {(2 i b) \int \left (a+b \tan ^{-1}(c x)\right ) \, dx}{c^4 d^2}-\frac {(2 i b) \int \frac {a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx}{c^4 d^2}+\frac {(6 b) \int \frac {a+b \tan ^{-1}(c x)}{i-c x} \, dx}{c^4 d^2}-\frac {\left (4 b^2\right ) \int \frac {\text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{c^4 d^2}+\frac {(2 b) \int x \left (a+b \tan ^{-1}(c x)\right ) \, dx}{3 c^3 d^2}-\frac {(2 b) \int \frac {x \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2} \, dx}{3 c^3 d^2}\\ &=\frac {2 i a b x}{c^4 d^2}+\frac {b x^2 \left (a+b \tan ^{-1}(c x)\right )}{3 c^3 d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right )}{c^5 d^2 (i-c x)}+\frac {11 i \left (a+b \tan ^{-1}(c x)\right )^2}{6 c^5 d^2}+\frac {3 x \left (a+b \tan ^{-1}(c x)\right )^2}{c^4 d^2}-\frac {i x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^3 d^2}-\frac {x^3 \left (a+b \tan ^{-1}(c x)\right )^2}{3 c^2 d^2}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{c^5 d^2 (i-c x)}+\frac {6 b \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{c^5 d^2}-\frac {4 i \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^5 d^2}+\frac {4 b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^5 d^2}-\frac {2 i b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{c^5 d^2}+\frac {(2 b) \int \frac {a+b \tan ^{-1}(c x)}{i-c x} \, dx}{3 c^4 d^2}+\frac {\left (i b^2\right ) \int \frac {1}{(-i+c x) \left (1+c^2 x^2\right )} \, dx}{c^4 d^2}+\frac {\left (2 i b^2\right ) \int \tan ^{-1}(c x) \, dx}{c^4 d^2}-\frac {\left (6 b^2\right ) \int \frac {\log \left (\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{c^4 d^2}-\frac {b^2 \int \frac {x^2}{1+c^2 x^2} \, dx}{3 c^2 d^2}\\ &=\frac {2 i a b x}{c^4 d^2}-\frac {b^2 x}{3 c^4 d^2}+\frac {2 i b^2 x \tan ^{-1}(c x)}{c^4 d^2}+\frac {b x^2 \left (a+b \tan ^{-1}(c x)\right )}{3 c^3 d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right )}{c^5 d^2 (i-c x)}+\frac {11 i \left (a+b \tan ^{-1}(c x)\right )^2}{6 c^5 d^2}+\frac {3 x \left (a+b \tan ^{-1}(c x)\right )^2}{c^4 d^2}-\frac {i x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^3 d^2}-\frac {x^3 \left (a+b \tan ^{-1}(c x)\right )^2}{3 c^2 d^2}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{c^5 d^2 (i-c x)}+\frac {20 b \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{3 c^5 d^2}-\frac {4 i \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^5 d^2}+\frac {4 b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^5 d^2}-\frac {2 i b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{c^5 d^2}+\frac {\left (6 i b^2\right ) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+i c x}\right )}{c^5 d^2}+\frac {\left (i b^2\right ) \int \frac {1}{(-i+c x)^2 (i+c x)} \, dx}{c^4 d^2}+\frac {b^2 \int \frac {1}{1+c^2 x^2} \, dx}{3 c^4 d^2}-\frac {\left (2 b^2\right ) \int \frac {\log \left (\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{3 c^4 d^2}-\frac {\left (2 i b^2\right ) \int \frac {x}{1+c^2 x^2} \, dx}{c^3 d^2}\\ &=\frac {2 i a b x}{c^4 d^2}-\frac {b^2 x}{3 c^4 d^2}+\frac {b^2 \tan ^{-1}(c x)}{3 c^5 d^2}+\frac {2 i b^2 x \tan ^{-1}(c x)}{c^4 d^2}+\frac {b x^2 \left (a+b \tan ^{-1}(c x)\right )}{3 c^3 d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right )}{c^5 d^2 (i-c x)}+\frac {11 i \left (a+b \tan ^{-1}(c x)\right )^2}{6 c^5 d^2}+\frac {3 x \left (a+b \tan ^{-1}(c x)\right )^2}{c^4 d^2}-\frac {i x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^3 d^2}-\frac {x^3 \left (a+b \tan ^{-1}(c x)\right )^2}{3 c^2 d^2}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{c^5 d^2 (i-c x)}+\frac {20 b \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{3 c^5 d^2}-\frac {4 i \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^5 d^2}-\frac {i b^2 \log \left (1+c^2 x^2\right )}{c^5 d^2}+\frac {3 i b^2 \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^5 d^2}+\frac {4 b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^5 d^2}-\frac {2 i b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{c^5 d^2}+\frac {\left (2 i b^2\right ) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+i c x}\right )}{3 c^5 d^2}+\frac {\left (i b^2\right ) \int \left (-\frac {i}{2 (-i+c x)^2}+\frac {i}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{c^4 d^2}\\ &=\frac {2 i a b x}{c^4 d^2}-\frac {b^2 x}{3 c^4 d^2}+\frac {b^2}{2 c^5 d^2 (i-c x)}+\frac {b^2 \tan ^{-1}(c x)}{3 c^5 d^2}+\frac {2 i b^2 x \tan ^{-1}(c x)}{c^4 d^2}+\frac {b x^2 \left (a+b \tan ^{-1}(c x)\right )}{3 c^3 d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right )}{c^5 d^2 (i-c x)}+\frac {11 i \left (a+b \tan ^{-1}(c x)\right )^2}{6 c^5 d^2}+\frac {3 x \left (a+b \tan ^{-1}(c x)\right )^2}{c^4 d^2}-\frac {i x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^3 d^2}-\frac {x^3 \left (a+b \tan ^{-1}(c x)\right )^2}{3 c^2 d^2}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{c^5 d^2 (i-c x)}+\frac {20 b \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{3 c^5 d^2}-\frac {4 i \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^5 d^2}-\frac {i b^2 \log \left (1+c^2 x^2\right )}{c^5 d^2}+\frac {10 i b^2 \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{3 c^5 d^2}+\frac {4 b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^5 d^2}-\frac {2 i b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{c^5 d^2}-\frac {b^2 \int \frac {1}{1+c^2 x^2} \, dx}{2 c^4 d^2}\\ &=\frac {2 i a b x}{c^4 d^2}-\frac {b^2 x}{3 c^4 d^2}+\frac {b^2}{2 c^5 d^2 (i-c x)}-\frac {b^2 \tan ^{-1}(c x)}{6 c^5 d^2}+\frac {2 i b^2 x \tan ^{-1}(c x)}{c^4 d^2}+\frac {b x^2 \left (a+b \tan ^{-1}(c x)\right )}{3 c^3 d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right )}{c^5 d^2 (i-c x)}+\frac {11 i \left (a+b \tan ^{-1}(c x)\right )^2}{6 c^5 d^2}+\frac {3 x \left (a+b \tan ^{-1}(c x)\right )^2}{c^4 d^2}-\frac {i x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{c^3 d^2}-\frac {x^3 \left (a+b \tan ^{-1}(c x)\right )^2}{3 c^2 d^2}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{c^5 d^2 (i-c x)}+\frac {20 b \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{3 c^5 d^2}-\frac {4 i \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^5 d^2}-\frac {i b^2 \log \left (1+c^2 x^2\right )}{c^5 d^2}+\frac {10 i b^2 \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{3 c^5 d^2}+\frac {4 b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^5 d^2}-\frac {2 i b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{c^5 d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.59, size = 502, normalized size = 1.16 \begin {gather*} -\frac {-36 a^2 c x+12 i a^2 c^2 x^2+4 a^2 c^3 x^3-\frac {12 a^2}{-i+c x}+48 a^2 \text {ArcTan}(c x)-24 i a^2 \log \left (1+c^2 x^2\right )+2 a b \left (-2-12 i c x-2 c^2 x^2+48 \text {ArcTan}(c x)^2-3 \cos (2 \text {ArcTan}(c x))+20 \log \left (1+c^2 x^2\right )+24 \text {PolyLog}\left (2,-e^{2 i \text {ArcTan}(c x)}\right )+2 \text {ArcTan}(c x) \left (6 i-18 c x+6 i c^2 x^2+2 c^3 x^3-3 i \cos (2 \text {ArcTan}(c x))+24 i \log \left (1+e^{2 i \text {ArcTan}(c x)}\right )-3 \sin (2 \text {ArcTan}(c x))\right )+3 i \sin (2 \text {ArcTan}(c x))\right )+b^2 \left (4 c x-4 \text {ArcTan}(c x)-24 i c x \text {ArcTan}(c x)-4 c^2 x^2 \text {ArcTan}(c x)+52 i \text {ArcTan}(c x)^2-36 c x \text {ArcTan}(c x)^2+12 i c^2 x^2 \text {ArcTan}(c x)^2+4 c^3 x^3 \text {ArcTan}(c x)^2+32 \text {ArcTan}(c x)^3+3 i \cos (2 \text {ArcTan}(c x))-6 \text {ArcTan}(c x) \cos (2 \text {ArcTan}(c x))-6 i \text {ArcTan}(c x)^2 \cos (2 \text {ArcTan}(c x))-80 \text {ArcTan}(c x) \log \left (1+e^{2 i \text {ArcTan}(c x)}\right )+48 i \text {ArcTan}(c x)^2 \log \left (1+e^{2 i \text {ArcTan}(c x)}\right )+12 i \log \left (1+c^2 x^2\right )+8 (5 i+6 \text {ArcTan}(c x)) \text {PolyLog}\left (2,-e^{2 i \text {ArcTan}(c x)}\right )+24 i \text {PolyLog}\left (3,-e^{2 i \text {ArcTan}(c x)}\right )+3 \sin (2 \text {ArcTan}(c x))+6 i \text {ArcTan}(c x) \sin (2 \text {ArcTan}(c x))-6 \text {ArcTan}(c x)^2 \sin (2 \text {ArcTan}(c x))\right )}{12 c^5 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 9.06, size = 1372, normalized size = 3.17
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(1372\) |
default | \(\text {Expression too large to display}\) | \(1372\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {x^4\,{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{{\left (d+c\,d\,x\,1{}\mathrm {i}\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________